package drrr.controller;

import drrr.orm.RoomEntity;
import org.apache.struts2.ServletActionContext;

import java.util.List;

/**
 * Created by lirance on 15/5/22.
 * <p>
 * 获取房间成员
 */
public class RoomMemberList extends BaseAction {


    private List RoomMemberLists;


    public List getRoomMemberLists() {
        return RoomMemberLists;
    }

    public void setRoomMemberLists(List roomMemberLists) {
        RoomMemberLists = roomMemberLists;
    }

    @Override
    public String execute() throws Exception {
        int roomId = ((RoomEntity) ServletActionContext.getContext().getSession().get("room")).getId();
        this.setRoomMemberLists(this.getAllService().getRoomMemberService().getEntitiesbyID(roomId));
        return SUCCESS;
    }
}
